﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace MShop.Core.Domain
{

    [MetadataType(typeof(Ad_Validation))]
    public partial class Ad
    {
        public Ad()
        {
            this.CId = 1;
            this.Created = DateTime.Now;
            this.Click = 1;
            this.Status = 1;
        }
    }

    internal partial class Ad_Validation
    {

        [DisplayName("标题")]
        [System.ComponentModel.DataAnnotations.Required(ErrorMessage = "标题不能为空")]
        public string Title { get; set; }

        [DisplayName("状态")]     
        public int Status { get; set; }
         [System.ComponentModel.DataAnnotations.Required(ErrorMessage = "地址不能为空,如空请输入#")]
        [DisplayName("Http地址")]
        public string RedirectUrl { get; set; }

        [UIHint("Img")]
        [DisplayName("图片路径")]
        public string ImageUrl { get; set; }

        [DisplayName("排序")]
        public int Sort { get; set; }
    }
}